<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="演员名称" prop="actorName">
        <el-input
          v-model="queryParams.actorName"
          placeholder="请输入演员名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>


      <el-form-item label="演员简介" prop="actorIntroduce">
        <el-input
          v-model="queryParams.actorIntroduce"
          placeholder="请输入演员简介"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="点击次数" prop="actorClick">
        <el-input
          v-model="queryParams.actorClick"
          placeholder="查询出输入次数以内的值"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="演员标签" prop="actorTag">
        <el-input
          v-model="queryParams.actorTag"
          placeholder="请输入演员标签"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['xqsp:actor:add']"
        >新增
        </el-button>
      </el-col>
      <!--      <el-col :span="1.5">-->
      <!--        <el-button-->
      <!--          type="success"-->
      <!--          plain-->
      <!--          icon="el-icon-edit"-->
      <!--          size="mini"-->
      <!--          :disabled="single"-->
      <!--          @click="handleUpdate"-->
      <!--          v-hasPermi="['xqsp:actor:edit']"-->
      <!--        >修改</el-button>-->
      <!--      </el-col>-->
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['xqsp:actor:remove']"
        >删除
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['xqsp:actor:export']"
        >导出
        </el-button>
      </el-col>

      <el-col :span="1.5">
        <el-button
          type="info"
          plain
          icon="el-icon-bottom"
          size="mini"
          @click="handleClick"

        >排序
        </el-button>
      </el-col>

      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="actorList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center"/>
      <el-table-column label=" 演员id" align="center" prop="actorId"/>
      <el-table-column label="演员名称" align="center" prop="actorName"/>
      <el-table-column label="演员头像" align="center">
        <template slot-scope="scope">
          <el-image :src="scope.row.actorHeadImg" :preview-src-list="[scope.row.actorHeadImg]"
                    style="width: 100px;height: 100px"/>
        </template>
      </el-table-column>
      <el-table-column label="演员封面" align="center">
        <template slot-scope="scope">
          <el-image :src="scope.row.actorCoverImg" :preview-src-list="[scope.row.actorCoverImg]"
                    style="width: 100px;height: 100px"/>
        </template>
      </el-table-column>

      <el-table-column label="演员背景" align="center">
        <template slot-scope="scope">
          <el-image :src="scope.row.actorBg" :preview-src-list="[scope.row.actorBg]"
                    style="width: 100px;height: 100px"/>
        </template>
      </el-table-column>

      <el-table-column label="演员简介" :show-overflow-tooltip="true" align="center" prop="actorIntroduce"/>


      <el-table-column label="演员点击次数" align="center" prop="actorClick"/>
      <el-table-column label="演员标签" align="center" prop="actorTag"/>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['xqsp:actor:edit']"
          >修改
          </el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['xqsp:actor:remove']"
          >删除
          </el-button>

          <el-button
            size="mini"
            type="text"
            icon="el-icon-search"
            @click="handleZuoPin(scope.row)"

          >作品
          </el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-more"
            @click="handleMessage(scope.row)"

          >详情
          </el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-plus"
            @click="handleActorMessage(scope.row)"

          >详情添加
          </el-button>

        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改演员管理对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
      <el-form ref="form1" :model="form1" :rules="rules1" label-width="80px">
        <el-form-item label="演员名称" prop="actorName">
          <el-input v-model="form1.actorName" placeholder="请输入演员名称"/>
        </el-form-item>

        <el-form-item label="演员头像" prop="actorHeadImg">
          <el-input v-model="form1.actorHeadImg" placeholder="请输入演员头像地址"/>
        </el-form-item>
        <el-form-item label="演员封面" prop="actorCoverImg">
          <el-input v-model="form1.actorCoverImg" placeholder="请输入演员封面地址"/>
        </el-form-item>
        <el-form-item label="演员背景" prop="actorBg">
          <el-input v-model="form1.actorBg" placeholder="请输入演员背景地址"/>
        </el-form-item>
        <el-form-item label="演员简介" prop="actorIntroduce">
          <el-input v-model="form1.actorIntroduce" type="textarea" placeholder="请输入演员简介(字数最多500字)" maxlength="500"
                    show-word-limit :autosize="{minRows:4,maxRows:10}"/>
          <!-- autosize文本框行数自适应 -->

        </el-form-item>
        <el-form-item label="点击次数" prop="actorClick">
          <el-input v-model="form1.actorClick" placeholder="请输入演员点击次数(默认为0)"/>
        </el-form-item>
        <el-form-item label="演员标签" prop="actorTag">
          <el-input v-model="form1.actorTag" placeholder="请输入演员标签"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <!--演员作品展示框 -->
    <el-dialog :title="title" :visible.sync="open2" width="900px" append-to-body>

      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
        <el-form-item>
          <el-button type="primary" icon="el-icon-refresh" size="mini" @click="videoRefresh">刷新</el-button>
          <el-button icon="el-icon-bottom" size="mini" @click="sortByTime">排序</el-button>
        </el-form-item>
      </el-form>

      <el-table
        :data="tableData"
        height="550"
        border
        style="width: 100%">
        <el-table-column
          prop="videoName"
          label="视频名称"
          width="180">
        </el-table-column>
        <el-table-column label="视频封面" width="100" align="center" prop="spVideo.videoCoverImg">
          <template slot-scope="scope">
            <el-image :src="scope.row.videoCoverImg" :preview-src-list="[scope.row.videoCoverImg]"
                      style="width: 100px;height: 100px"/>
          </template>
        </el-table-column>
        <el-table-column
          prop="videoIntroduce"
          label="视频介绍"
          width="280">
        </el-table-column>
        <el-table-column
          prop="videoUrl"
          label="地址">
        </el-table-column>
        <el-table-column
          prop="videoTime"
          label="上传时间"
        >
        </el-table-column>
        <el-table-column
          fixed="right"
          label="操作"
          width="100">
          <template slot-scope="scope">

            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleUpdateVideo(scope.row)"
              v-hasPermi="['xqsp:video:edit']"
            >修改
            </el-button>


            <el-button type="text" size="small"
                       icon="el-icon-delete"
                       @click="handleDeleteVideo(scope.row)"
                       v-hasPermi="['xqsp:video:remove']">删除
            </el-button>
          </template>
        </el-table-column>

      </el-table>

      <pagination
        v-show="total>0"
        :total="total1"
        :page.sync="queryParams1.pageNum"
        :limit.sync="queryParams1.pageSize"
        @pagination="handleZuoPin(1)"
      />


      <div slot="footer" class="dialog-footer">

        <el-button @click="cancel2">取 消</el-button>
      </div>
    </el-dialog>

    <!--  演员详情添加-->
    <el-dialog :title="title" :visible.sync="open3" width="600px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
        <el-form-item label="" prop="actorId">
        </el-form-item>
        <el-form-item label="感情状态" prop="actorMessageEmotionalState">
          <el-input v-model="form.actorMessageEmotionalState" placeholder="请输入感情状态"/>
        </el-form-item>
        <el-form-item label="喜欢" prop="actorMessageLove">
          <el-input v-model="form.actorMessageLove" placeholder="请输入喜欢"/>
        </el-form-item>
        <el-form-item label="性别" prop="actorMessageSex">
          <el-select v-model="form.actorMessageSex" placeholder="请选择性别">
            <el-option label="请选择性别" value=""/>
            <el-option label="男" value="男"/>
            <el-option label="女" value="女"/>
            <el-option label="人妖" value="人妖"/>
          </el-select>
        </el-form-item>
        <el-form-item label="生日" prop="actorMessageBirth">
          <el-date-picker clearable size="small"
                          v-model="form.actorMessageBirth"
                          type="date"
                          value-format="yyyy-MM-dd"
                          placeholder="选择生日">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="年龄" prop="actorMessageAge">
          <el-input v-model="form.actorMessageAge" placeholder="请输入年龄"/>
        </el-form-item>
        <el-form-item label="种族" prop="actorMessageRace">
          <el-input v-model="form.actorMessageRace" placeholder="请输入种族"/>
        </el-form-item>
        <el-form-item label="发色" prop="actorMessageHairColor">
          <el-input v-model="form.actorMessageHairColor" placeholder="请输入发色"/>
        </el-form-item>
        <el-form-item label="假奶子" prop="actorMessageFakeMilk">
          <el-input v-model="form.actorMessageFakeMilk" placeholder="请输入假奶子"/>
        </el-form-item>
        <el-form-item label="三围" prop="actorMessageSanwei">
          <el-input v-model="form.actorMessageSanwei" placeholder="请输入三围"/>
        </el-form-item>
        <el-form-item label="身高(cm)" prop="actorMessageStature">
          <el-input v-model="form.actorMessageStature" placeholder="请输入身高"/>
        </el-form-item>
        <el-form-item label="体重(kg)" prop="actorMessageWeight">
          <el-input v-model="form.actorMessageWeight" placeholder="请输入体重"/>
        </el-form-item>
        <el-form-item label="城市和国家" prop="actorMessageSite">
          <el-input v-model="form.actorMessageSite" placeholder="请输入城市和国家"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm1">确 定</el-button>
        <el-button @click="cancel1">取 消</el-button>
      </div>
    </el-dialog>
    <!--演员详情遮罩层 -->

    <el-drawer
      title="演员详情"
      size="70%"
      :visible.sync="drawer"
      :with-header="false">
      <el-tabs type="border-card">
        <el-tab-pane label="演员详情" class="page1">
          <ActorMessage :actorMessage1="actorMessage1"></ActorMessage>
        </el-tab-pane>
      </el-tabs>
    </el-drawer>


    <!-- 修改视频管理对话框 -->
    <el-dialog :title="title" :visible.sync="openVideo" width="800px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules2" label-width="80px">
        <el-form-item label="视频名称" prop="videoName">
          <el-input v-model="form.videoName" type="textarea" placeholder="请输入内容"/>
        </el-form-item>
        <el-form-item label="视频封面" prop="videoCoverImg">
          <el-input v-model="form.videoCoverImg" type="textarea" placeholder="请输入内容"/>
        </el-form-item>
        <el-form-item label="视频介绍" prop="videoIntroduce">
          <el-input v-model="form.videoIntroduce" type="textarea" placeholder="请输入视频介绍(字数最多500字)" maxlength="500"
                    show-word-limit :autosize="{minRows:4,maxRows:10}"/>
        </el-form-item>
        <el-form-item label="视频地址" prop="videoUrl">
          <el-input v-model="form.videoUrl" type="textarea" placeholder="请输入内容"/>

        </el-form-item>


      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFormVideo">确 定</el-button>
      </div>
    </el-dialog>


  </div>
</template>

<script>

  import {listActor, getActor, delActor, addActor, updateActor, exportActor} from "@/api/xqsp/actor";

  import ActorMessage from "./actorMessage";
  import {getMessage, getMessages, addMessage} from "@/api/xqsp/message";
  import {
    getVideoByActorId,
    listVideo,
    getVideo,
    uploadVideo,
    delVideo,
    addVideo,
    updateVideo,
    exportVideo
  } from "@/api/xqsp/video";

  export default {
    name: "Actor",
    components: {
      ActorMessage,

    },
    data() {
      return {
        // 子模块数据
        actorMessage1: {actorId: undefined, actorName: undefined},
        // 抽屉渲标识
        drawer: false,
        // 遮罩层
        loading: true,
        // 选中数组
        ids: [],
        // 选中数组
        names: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        total1: 0,
        // 演员管理表格数据
        actorList: [],

        //演员作品表格数据
        tableData: [],
        // 弹出层标题
        title: "",
        // 是否显示添加修改弹出层
        open: false,
        // 是否显示作品弹出层
        open2: false,
        //是否显示演员详情弹出层
        open3: false,
        //视频修改
        openVideo: false,
//播放视频
        videoUrl: "",

        //演员id
        actorId: "",
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,
          actorName: null,
          actorHeadImg: null,
          actorCoverImg: null,
          actorBg:null,
          actorIntroduce: null,
          actorClick: null,
          actorTag: null
        },
        queryParams1: {
          pageNum: 1,
          pageSize: 10,
          actorId: null,
        },
        // 表单参数
        form: {},
        form1: {},
        // 表单校验
        rules2: {},
        rules1: {
          actorName: [
            {required: true, message: "演员名称不能为空", trigger: "blur"}
          ],
          actorHeadImg: [
            {required: true, message: "演员头像不能为空", trigger: "blur"}
          ],
          actorCoverImg: [
            {required: true, message: "演员封面不能为空", trigger: "blur"}
          ],
          actorBg: [
            {required: true, message: "演员背景不能为空", trigger: "blur"}
          ],
          actorIntroduce: [
            {required: true, message: "演员介绍不能为空", trigger: "blur"}
          ],
          actorClick: [
            {
              pattern: /^[+]{0,1}(\d+)$/,
              message: '请输入正整数',
              trigger: 'blur'
            }
          ],
        },
        rules: {

          actorMessageSex: [
            {required: true, message: "演员性别不能为空", trigger: "blur"}
          ],
          actorMessageSite: [
            {required: true, message: "演员地址不能为空", trigger: "blur"}
          ],

          actorMessageAge: [
            {
              pattern: /^120$|^[ 1 - 9 ]$|^((1[0-1])|[1-9])\d$/,
              message: '请输入规范的年龄信息',
              trigger: 'blur'
            }
          ],
          actorMessageWeight: [
            {
              pattern: /^([0-9]{2,3})$/,
              message: '请输入规范的体重信息',
              trigger: 'blur'
            }
          ],
          actorMessageStature: [
            {
              pattern: /^([0-9]{3})$/,
              message: '请输入规范的身高信息',
              trigger: 'blur'
            }
          ],

        },


      };
    },
    created() {
      this.getList();
    },
    methods: {

      //视频播放
      look(row) {
        this.videoUrl = row.videoUrl;
        this.dialogVisible = true;
      },

      /** 查询演员管理列表 */
      getList() {
        this.loading = true;
        listActor(this.queryParams).then(response => {
          this.actorList = response.rows;
          this.total = response.total;
          this.loading = false;
        });
      },

      /** 根据点击次数排序查询 */
      getSortList() {
        this.loading = true;
        listActor(this.queryParams).then(response => {

          this.actorList = response.rows.sort(
            function (a, b) {
              return b.actorClick - a.actorClick;  //由大到小进行排序
            }
          );
          this.total = response.total;
          this.loading = false;
        });
      },


      // 取消按钮
      cancel() {
        this.open = false;
        this.reset();
      },
      // 取消按钮
      cancel1() {
        this.open3 = false;
        this.reset();
      },
      // 取消按钮
      cancel2() {
        this.open2 = false;
        this.reset();
      },
      // 表单重置
      reset1() {
        this.form1 = {
          actorId: null,
          actorName: null,
          actorHeadImg: null,
          actorCoverImg: null,
          actorIntroduce: null,
          actorClick: null,
          actorTag: null,
          actorMessageId: null,
        };
        this.resetForm("form1");
      },
      reset() {
        this.form = {
          actorId: null,
          actorMessageEmotionalState: null,
          actorMessageLove: null,
          actorMessageSex: null,
          actorMessageBirth: null,
          actorMessageAge: null,
          actorMessageRace: null,
          actorMessageHairColor: null,
          actorMessageFakeMilk: null,
          actorMessageSanwei: null,
          actorMessageStature: null,
          actorMessageWeight: null,
          actorMessageSite: null
        };
        this.resetForm("form");
      },


      /** 搜索按钮操作 */
      handleQuery() {
        this.queryParams.pageNum = 1;
        this.getList();
      },

      /** 根据点击次数排序*/
      handleClick() {
        this.getSortList();
      },
      /** 重置按钮操作 */
      resetQuery() {
        this.resetForm("queryForm");
        this.handleQuery();
      },
      // 多选框选中数据
      handleSelectionChange(selection) {
        this.ids = selection.map(item => item.actorId)
        this.names = selection.map(item => item.actorName)
        this.single = selection.length !== 1
        this.multiple = !selection.length
      },
      /** 新增按钮操作 */
      handleAdd() {
        this.reset();
        this.reset1();
        this.open = true;
        this.title = "添加演员管理";
      },
//作品刷新
      videoRefresh() {
        const actorId = this.actorId;
        this.queryParams1.actorId = actorId;
        getVideoByActorId(this.queryParams1).then(response => {
          console.log(response.rows)
          this.tableData = response.rows;
          this.total1 = response.total;
          this.loading = false;


        });
      },
//作品根据时间排序
      sortByTime() {
        const actorId = this.actorId;
        this.queryParams1.actorId = actorId;
        getVideoByActorId(this.queryParams1).then(response => {

          this.tableData = response.rows.sort(
            function (a, b) {
              var x = a.videoTime.replace(/:/g, "").replace(/-/g, "").replace("", "")
              var y = b.videoTime.replace(/:/g, "").replace(/-/g, "").replace("", "")
              return ((x > y) ? -1 : ((x < y) ? 1 : 0));  //由大到小进行排序
            }
          );
          this.total1 = response.total;
          this.loading = false;


        });
      },

      /** 显示演员作品 */
      handleZuoPin(row) {
        if (row == 1) {
          this.queryParams1.actorId = this.actorId;
        } else {
          const actorId = row.actorId;
          this.actorId = actorId;
          this.queryParams1.actorId = this.actorId;
        }

        getVideoByActorId(this.queryParams1).then(response => {
          console.log(response.rows)
          this.tableData = response.rows;
          this.total1 = response.total;
          this.open2 = true;
          this.title = "查看演员“" + row.actorName + "”的作品";

          this.loading = false;


        });


      },
      /**
       * 显示验员详情*/
      handleMessage(row) {
        this.reset();


        getMessages(row.actorId).then(Response => {

          console.log(Response.data)
          if (Response.data == null) {
            this.msgError("该演员没有详情");
            return
          } else {
            this.getActorMessage(row.actorId, row.actorName);
          }
        })


      },

      getActorMessage(actorId, actorName) {
        this.actorMessage1 = {
          actorId: actorId,
          actorName: actorName
        };
        this.drawer = true;
      },

      handleActorMessage(row) {
        this.reset();

        getMessages(row.actorId).then(Response => {

          if (Response.data != null) {
            this.msgError("该演员已有详情");
            return
          } else {
            this.actorId = row.actorId;
            this.open3 = true;
          }
        })


      },


      /** 修改按钮操作 */
      handleUpdate(row) {
        this.reset();
        this.reset1();
        const actorId = row.actorId || this.ids
        const actorName = row.actorName || this.names
        getActor(actorId).then(response => {
          this.form1 = response.data;
          this.open = true;
          this.title = "修改演员“" + actorName + "”的信息";
        });
      },
      /** 提交按钮 */
      submitForm() {
        this.$refs["form1"].validate(valid => {
          if (valid) {
            if (this.form1.actorId != null) {
              updateActor(this.form1).then(response => {
                this.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              });
            } else {

              addActor(this.form1).then(response => {

                this.msgSuccess("新增演员成功");

                console.log(response.data)

                this.actorId = response.data;
                this.open = false;
                this.getList();
                this.open3 = true;
              });
            }
          }
        });
      },


      /** 演员详情提交按钮 */
      submitForm1() {
        this.$refs["form"].validate(valid => {
          if (valid) {
            this.form.actorId = this.actorId;
            addMessage(this.form).then(response => {
              this.msgSuccess("新增成功");
              this.open3 = false;
              this.getList();

            });

          }
        });
      },

      /** 修改演员作品按钮操作 */
      handleUpdateVideo(row) {
        this.reset();
        this.reset1();
        const videoId = row.videoId
        getVideo(videoId).then(response => {
          this.form = response.data;
          this.openVideo = true;
          this.title = "修改视频管理";
        });
      },
      /** 提交按钮 */
      submitFormVideo() {
        this.$refs["form"].validate(valid => {
          if (valid) {
            if (this.form.videoUrl != null) {
              updateVideo(this.form).then(response => {
                this.msgSuccess("修改成功");
                this.openVideo = false;
                this.videoRefresh();
              });

            }
            return Promise.all(uploadList)

          }
        });
      },


      /** 删除演员作品按钮操作 */
      handleDeleteVideo(row) {
        const videoIds = row.videoId;
        this.$confirm('是否确认删除视频管理编号为"' + videoIds + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function () {

          return delVideo(videoIds);
        }).then(() => {
          this.videoRefresh();
          this.msgSuccess("删除成功");
        })
      },


      /** 删除按钮操作 */
      handleDelete(row) {
        const actorIds = row.actorId || this.ids;
        const actorName = row.actorName || this.names
        this.$confirm('是否确认删除演员名字为"' + actorName + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function () {
          return delActor(actorIds);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
      },
      /** 导出按钮操作 */
      handleExport() {
        const queryParams = this.queryParams;
        this.$confirm('是否确认导出所有演员管理数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function () {
          return exportActor(queryParams);
        }).then(response => {
          this.download(response.msg);
        })
      }
    }
  };

</script>
<style ang="scss">
  .el-tooltip__popper {
    max-width: 300px;

    background: #000 !important; /*背景色  !important优先级*/
    opacity: 0.5 !important; /*背景色透明度*/
    color: #FFFFFF !important; /*字体颜色*/

  }
</style>
